package com.uenpay.oem.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.uenpay.oem.common.AppConstant;
import com.uenpay.oem.common.RxBusEventConstant;
import com.uenpay.oem.ui.main.home.HomeNewFragment;
import com.uenpay.oem.ui.main.my.MyFragment;
import com.uenpay.util.rx.CommonEvent;
import com.uenpay.util.rx.RxBus;

public class Myreceiver extends BroadcastReceiver {
	@Override
		public void onReceive(Context context, Intent intent) {
			String activity=intent.getAction();
			if (activity.equals(AppConstant.BALANCE_CHANGER)){
				RxBus.$().post(MyFragment.TAG, new CommonEvent(RxBusEventConstant.EVENT_RECHARGE_SUCCESS));
				RxBus.$().post(HomeNewFragment.TAG, new CommonEvent(RxBusEventConstant.EVENT_RECHARGE_SUCCESS));
			}
		}
	}